Computer networks and the devices and services that reside on them are often the subject of attacks by parties that are attempting to improperly access information and resources or to introduce malicious code to the networks. One form of attack is a heap spray attack that involves the introduction of large amounts of data into process memory in order to cause the allocation of certain regions and to provide a large pool of addresses to which execution can be branched that will result in attack payload execution.